package com.dgw.springbootrabbitmq.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: spring-boot-rabbitmq
 * @description: 任务队列
 * @author: Mr.Dai
 * @create: 2020-02-20 21:23
 **/
@Configuration
public class TaskConfig {
    public final static String TASK_QUEUE_NAME="task.queue";
    @Bean
    public Queue taskQueue(){
        // 第二个参数表示持久化
        return new Queue(TASK_QUEUE_NAME,true);
    }
}
